package zct.proj.pojo;

import java.util.HashMap;

public class EquipmentInfo {
	// 控件编号
	private int id;

	// 显示名称
	private String disp;

	// 控件名
	private String name;

	// 控件类型
	private int type;

	// 标注颜色
	private int textColor;

	// 方向
	private int dir;

	// x坐标
	private int x;

	// y坐标
	private int y;

	// 宽
	private int width;

	// 高
	private int height;

	// 字号
	private int fontsize;

	// 图形颜色
	private int color;

	// 显示字体
	private String font;
	
	// 颜色开关量列表  key:开关名  value:开关对应序号
	private HashMap<String, Integer> swMap;

	// 是否隐藏名称
	private boolean nameVisible;

	public int getId() {
		return id;
	}

	public void setId(int value) {
		id = value;
	}

	public String getDisp() {
		return disp;
	}

	public void setDisp(String value) {
		disp = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String value) {
		name = value;
	}

	public int getType() {
		return type;
	}

	public void setType(int value) {
		type = value;
	}

	public int getTextColor() {
		return textColor;
	}

	public void setTextColor(int value) {
		textColor = value;
	}

	public int getDir() {
		return dir;
	}

	public void setDir(int value) {
		dir = value;
	}

	public int getX() {
		return x;
	}

	public void setX(int value) {
		x = value;
	}

	public int getY() {
		return y;
	}

	public void setY(int value) {
		y = value;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int value) {
		width = value;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int value) {
		height = value;
	}

	public int getFontsize() {
		return fontsize;
	}

	public void setFontsize(int value) {
		fontsize = value;
	}

	public int getColor() {
		return color;
	}

	public void setColor(int value) {
		color = value;
	}

	public String getFont() {
		return font;
	}

	public void setFont(String value) {
		font = value;
	}

	public boolean getNameVisible() {
		return nameVisible;
	}

	public void setNameVisible(int value) {
		nameVisible = (value == 0);
	}
	
	public HashMap<String, Integer> getSwMap() {
		return swMap;
	}
	
	public void addSwMapItem(String key, int swIdx) {
		if (key.equals("X6-H")) {
			int x = swIdx;
			int y =x;
			x=y;
		}
		if (swMap == null) {
			swMap = new HashMap<String, Integer>();
		}
		if (!swMap.keySet().contains(key)) {
			swMap.put(key, swIdx);
		}
	}
}
